-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added function to get the csm namespaces from the cluster. #581
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good 👍
namespaceMap[csmResource.Namespace] = struct{}{} | ||
} | ||
|
||
// Convert set to slice |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we converting the map to a slice? why not just use the slice from the beginning and append to it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's to make sure only unique namespace entries are added. Using a map will ensure that. Duplicates will be removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got it
* Update GitHub Actions (#547) * update github actions * add exclusion * Adding tolerations for resiliency (#546) * Update Go Modules (#548) * update go modules * replace deprecated ioutil package * Fix related images auto update (#551) * Fix auto update of related images during make bundle * update comments in makefile --------- Co-authored-by: panigs7 <spandita.panigrahi@dell.com> * Fix invalid controllerstatus in ocp UI (#550) * fix invalid controller status * remove client status in apexclient as there is no client status in acc object --------- Co-authored-by: panigs7 <spandita.panigrahi@dell.com> * Add support for Authorization upgrade (#549) * Add support for authorization upgrade * Add upgrade-path.yaml for authorization proxy server * Add min upgrade path support for authorization proxy server * Fix status loggers * Fix linting issues * Fix linting issues * Fix authorization pre-checks * Update checkUpgrade for authorization * Update checkUpgrade for authorization * Fix controller UT * Add test scenarios for authorization sidecar upgrade to e2e * Fix module UT failure * Increase code coverage of controller pkg * Increase code coverage of controller pkg * Address review comments --------- Co-authored-by: Jooseppi Luna <jooseppi_luna@dell.com> * Fix linter errors (#557) * Added E2E Tests Scenarios for Authorization upgrade (#559) * Add yaml lint GitHub Action (#561) * add yaml lint action * E2E Updates (#564) * e2e test changes * consolidate replication test cases, comment out non-replication tags * fix bug * Update env-e2e-test.sh * got tests working * reconfigure how we run tests * minor bug fixes to script * fix bug * bug fix * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update array-info.sh * Update README.md * Update README.md * Update README.md * more detailed examples * Update README.md * go fmt * Update e2e_test.go * merge auth upgrade tests * consolidate sanity test cases * Added function to get the csm namespaces from the cluster. (#581) * function to get the csm namespaces from the cluster * change the function to unexported type for time being * refactor variablename and error message * refactor variablename and error message * fix yaml lint * Cherrypick v1.4.4 changes into main (#585) * add v1.0.3 support (#524) * add v1.0.3 support * update test files (cherry picked from commit 0763aac) * Changed cluster role binding for secrets to role binding on specific namespaces (#527) * Changed cluster role binding for secrets to role binding on specific namespaces * Modified sample CRD * Added Default CSM Namespace * Added csmNamespace in crds and samples * Added namespace - default to role * Hardcoded CSM namespace as dell-csm * Added namespace creation * Added secret names * add Namespace to GetModuleComponentObj * Added secret names * ClusterRole does not have namespace (k8s docs) --------- Co-authored-by: nijayf <francis.nijay@emc.com> Co-authored-by: Jooseppi Luna <jooseppi_luna@dell.com> (cherry picked from commit 4e74385) * Remove secret create restriction by resourcenames (#529) * Removed restriction by resourcenames * Moved permissions from clusterrole to role * Moved permissions from clusterrole to role * Update statefulset.yaml * Update statefulset.yaml * Update statefulset.yaml * Added list permission for secret at cluster level * removed list secret * review changes * review changes --------- Co-authored-by: Jooseppi Luna <jooseppi_luna@dell.com> (cherry picked from commit 7520e8a) * dont delete namespaces BRUV (#531) (cherry picked from commit 8ce8e00) --------- Co-authored-by: JacobGros <jacobgrosner4@gmail.com> Co-authored-by: Francis Nijay <francis.nijay@dell.com> * Add downgrade support (#584) * Support downgrade * Fix Annotation CSMVersion * removing comment * Fixing unit-test * increase unit-test coverage * Fix lint errors * Fix bug in versioncheck * Change variable name * Fix changes * Fix commits * Added annotations for app-mobility upgrade (#587) * Added annotations for app-mobility upgrade * Added upgrade path for 1.0.3 release Signed-off-by: Harish P <harish_p4@dell.com> --------- Signed-off-by: Harish P <harish_p4@dell.com> * changes to support brownfield onboarding to ANK8s (#588) * changes to support brownfield onboarding to ANK8s * code refactoring * remove commented code * remove commented code * remove commented code * remove commented code * remove commented code * Fixed lint issues * Fixed lint issues * Added UT tescases * Removing the failed testcases * add new unit test case * add new unit test case * refactor the code * refactor the code * refactor the code * refactor the code * refactor the code * lint-fix * lint-fix * Fixed lint issues Signed-off-by: Harish P <harish_p4@dell.com> * Fixed lint issues Signed-off-by: Harish P <harish_p4@dell.com> --------- Signed-off-by: Harish P <harish_p4@dell.com> Co-authored-by: Harish P <harish_p4@dell.com> Co-authored-by: meggm <meghana.gm@dell.com> * Updating ubi micro dependencies (#594) * Updating ubi micro dependencies * Downgrade support test (#592) * Add downgrade unit-tests * Fix broken unit-test * downgradestests * Add E2E test for downgrade support * Adding comments --------- Co-authored-by: daniyaliqbal2024 <daniyaliqbal_2024@depauw.edu> * Removing the role and rolebindings from the brownfield deployment (#596) * Removing the role and rolebindings from the brownfield deployment * Removing the role and rolebindings from the brownfield deployment * fixed lint issues * refactor getting acc namespace * Removing the role and rolebindings from the brownfield deployment --------- Co-authored-by: Harish P <harishp8889@gmail.com> Co-authored-by: Harish P <harish_p4@dell.com> Co-authored-by: ashleyvjoy <Ashley.Joy@dell.com> * update k8s.io/kubernetes (#601) * Cherry-picking commits from patch release 1.5.1 (#599) Cherry-picking the commits from patch release 1.5.1 * add e2e test case (#603) * Updating ubi micro script permissions (#605) * Prepare CSM-Operator for 1.6.0 release (#604) * update csm-operator version * update driver sample files and fix linting errors * upgrade modules * update sidecars * update config version * update sidecars and ocp version * CSI-Unity: Update usage of env X_CSI_ALLOWED_NETWORKS (#606) * update usage of env X_CSI_ALLOWED_NETWORKS * update config sample yaml * update env in node.yaml * update permission for containerstorage module (#602) * apex connectivity client upgrade support (#593) * sync acc and statefulset * update acc * fix golangci-lint * fix linter * remove comments * UT coverage * acc controller UT * lint fix and added statefulset UTs * lint fix * controller UT * fix linter * remove return for constant * UT fix * linter fix * lint fix * Driver pkg UT * remove comments * Add Application Mobility 1.1.0 Support (#607) * Add app mobility 1.1.0 support * update min upgrade path * Add n-2 support for upgrade/downgrade (#609) * fix linting check * fix linting * [KRV-25132] Auth CR changes * update files for new CR format for auth * [KRV-25132] Default images --------- Signed-off-by: Harish P <harish_p4@dell.com> Co-authored-by: Chiman Jain <36687396+chimanjain@users.noreply.github.com> Co-authored-by: abhi16394 <32352976+abhi16394@users.noreply.github.com> Co-authored-by: HarishH-DELL <109663924+HarishH-DELL@users.noreply.github.com> Co-authored-by: panigs7 <spandita.panigrahi@dell.com> Co-authored-by: Akshay Saini <109056238+AkshaySainiDell@users.noreply.github.com> Co-authored-by: Jooseppi Luna <jooseppi_luna@dell.com> Co-authored-by: Don Khan <don.khan@dell.com> Co-authored-by: KshitijaKakde <111420075+KshitijaKakde@users.noreply.github.com> Co-authored-by: ashleyvjoy <110008193+ashleyvjoy@users.noreply.github.com> Co-authored-by: JacobGros <jacobgrosner4@gmail.com> Co-authored-by: Francis Nijay <francis.nijay@dell.com> Co-authored-by: Harish P <harishp8889@gmail.com> Co-authored-by: Harish P <harish_p4@dell.com> Co-authored-by: meggm <meghana.gm@dell.com> Co-authored-by: rodrigobassil <115796094+rodrigobassil@users.noreply.github.com> Co-authored-by: daniyaliqbal2024 <daniyaliqbal_2024@depauw.edu> Co-authored-by: Meghana GM <41953467+meggm@users.noreply.github.com> Co-authored-by: ashleyvjoy <Ashley.Joy@dell.com> Co-authored-by: Nitesh-Rewatkar <90749010+nitesh3108@users.noreply.github.com> Co-authored-by: Rajendra Indukuri <82365588+rajendraindukuri@users.noreply.github.com> Co-authored-by: Surya Gupta <109594002+suryagupta4@users.noreply.github.com> Co-authored-by: root <shayna_finocchiaro@dell.com> Co-authored-by: Evgeny Uglov <evgeny.uglov@dell.com>
* function to get the csm namespaces from the cluster * change the function to unexported type for time being * refactor variablename and error message * refactor variablename and error message * fix yaml lint
Description
When the DN client is deployed through ApexConnectivityClient CR, the csm-operator looks for the existing CSM objects and the operator adds the required roles(similar to the one for dell-csm namespace) for the namespaces where the csm object resides.
This PR: Added a new function that identifies the namespaces having csm objects and returns it. Also added a new yaml manifest file that specifies the Role/Rolebinding rules.
GitHub Issues
List the GitHub issues impacted by this PR:
Checklist:
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Please also list any relevant details for your test configuration